package com.demo;

//长方形
public class Rectangle extends Shape{
    private double side;
    private double wide;
    public Rectangle(double side,double wide) {
        super("长方形");
        this.side=side;
        this.wide=wide;
    }

    @Override
    public double getArea() {
        return wide*side;
    }

    @Override
    public double getPerimeter() {
        return (wide+side)*2;
    }
}
